using BlazorAdmin.Interface;
using BootstrapBlazor.Components;
using Pangeo.Admin.Models;
using Microsoft.AspNetCore.Components;
using BlazorAdmin.Models;

namespace BlazorAdmin.Web.Shared.Components
{
    /// <summary>
    /// DeviceEdit.razor 编辑组件代码
    /// </summary>
    public partial class DeviceEdit
    {
        [Parameter]
        public Device? Value { get; set; }

        [Parameter]
        public EventCallback<Device>? ValueChanged { get; set; }

        protected override void OnInitialized()
        {
            TypeItems = DictService.GetByCategory(Consts.DeviceType);
        }

        #region Items 字典数据

        private List<SelectedItem> TypeItems { get; set; }

        #endregion

        #region Inject 注入的服务

        [Inject]
        private IDict DictService { get; set; }

        #endregion
    }
}
